package cn.wolfcode.crm.query;

import com.alibaba.druid.util.StringUtils;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Setter
@Getter
public class ChargeQueryObject extends ObjectQuery {
    private String keyword;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    public String getKeyword() {
        if (StringUtils.isEmpty(keyword)) {
            return null;
        } else {
            return keyword;
        }
    }
}
